<?php
define("PATHDRASTICTOOLS", "");
include(PATHDRASTICTOOLS."Examplemysqlconfig.php");
include(PATHDRASTICTOOLS."drasticSrcMySQL.class.php");
include("includes/appheader.php");
include("includes/functions.php");

$cityId=$_GET['city'];


class mysrc extends drasticSrcMySQL {
    
    protected function select(){
        $cityId=$_GET['city'];
        $city=getCity($cityId);
        $query="SELECT * FROM kiralik WHERE Sehir='".$city['name']."'";    
        $res = mysql_query($query, $this->conn) or die(mysql_error());
        return ($res);
    }		
}

$options = array(
        "delete_allowed" => false,
        "add_allowed" => false,
        "editablecols" => array ()
);
$src = new mysrc($server, $user, $pw, $db, $table, $options);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    
    <head>
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
        <meta name="author" content="Tezeuz" />
        <link rel="stylesheet" type="text/css" href="css/style.css" title="style" />
        <link rel="stylesheet" type="text/css" href="css/cloud_default.css"/>
        <link rel="stylesheet" type="text/css" href="css/grid_default.css"/>
        <link rel="stylesheet" type="text/css" href="css/map_default.css"/>
        <title>&#187;&#187;EMLAKIA<?php echo $city['name'];?></title>
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAaxMP4bYZJjdYhLLSqgpoAhSnofh1JCg1pwZ2XCrsox0gt0Nb2RQY62rtQAdTQ5mhl6COZ3UudJhV_w&hl=tr"
                type="text/javascript"></script>
        <script src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js"></script>
        
        <script src="js/map.js" type="text/javascript"></script>
        
    </head>
    
    <body onunload="GUnload()">
        <script type="text/javascript" src="js/mootools-1.2-core.js"></script>
        <script type="text/javascript" src="js/mootools-1.2-more.js"></script>
        <script type="text/javascript" src="js/drasticCloud.js"></script>
        <script type="text/javascript" src="js/drasticGrid.js"></script>
        <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=<?php echo $GApiKey ?>"></script>
        <script type="text/javascript" src="js/markermanager.js"></script>
        <script type="text/javascript" src="js/drasticMap.js"></script>
        <div class="mainContainer">
            <div class="search">
                <form action="#" method="post">
                    <div id="texbox">Search
                        <input type="text" name="search" class="searchbox" />
                    </div>
                </form>
            </div>
            
            <div class="supBar">
                <h1><span class="blue">E</span>mlaki<span class="blue">A </span> <span class="gray">| Emlak Harita Uygulamasi</span></h1>
            </div>
            
            <div class="menu">
                <a href="index.html"> <span class="orange">&#187;</span>Company</a> |
                <a href="index.html"> <span class="orange">&#187;</span>Products</a> |
                <a href="index.html"> <span class="orange">&#187;</span>Services</a> |
                <a href="index.html"> <span class="orange">&#187;</span>Partners</a> |
                <a href="index.html"> <span class="orange">&#187;</span>Clients</a> |
                <a href="index.html"> <span class="orange">&#187;</span>Contact</a>
            </div>
            <div class="mainInfo" id="map1"></div>
            
            <!-- End mainInfo-->
            <div class="resultGrid">
                <div id="grid1" ></div>
            </div>
            <!-- End mainContainer-->
            
            <div class="subContainer">
                
                <div class="subLinks">
                    <a href="index.html"> Company</a> |
                    <a href="index.html"> Products</a> |
                    <a href="index.html"> Services</a> |
                    <a href="index.html"> Partners</a> |
                    <a href="index.html"> Clients</a> |
                    <a href="index.html"> Contact</a>
                </div><!-- End subLinks-->
                
                <div class="copyright">
                    powered by <a href="http://www.oswd.org">OSWD</a>   |
                    <a href="http://validator.w3.org/check/referer"> Valid XHTML</a> |
                    <a href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a>
                </div>
                <!-- End copyright-->
                
            </div> <!-- End subContainer-->
        </div>
        <script type="text/javascript">
            var themap = new drasticMap('map1', {
                pathimg:"img/",
                displaycol: "No",
                addparams:"&city="+<?php echo $cityId; ?>,
                onClick: function(id){ thegrid.DefaultOnClick(id); themap.DefaultOnClick(id)}
            });
            /*var thecloud = new drasticCloud('cloud1', {
showmenu: false,
namecol: "Name",
sizecol: "Height",
sortcol: "Height",
sort: "d",
onClick: function(id){thecloud.DefaultOnClick(id); thegrid.DefaultOnClick(id); themap.DefaultOnClick(id)}
});*/
            var thegrid = new drasticGrid('grid1', {
                pathimg:"img/",
                pagelength: 10,
                renamecols: {"Coords":"Yeri"},
                addparams:"&city="+<?php echo $cityId; ?>,
                onClick: function(id){ thegrid.DefaultOnClick(id); themap.DefaultOnClick(id)},
                columns: [
                    {name: 'No',width: 20},
                    {name: 'Sehir',width: 60},
                    {name: 'Tipi',width: 50},
                    {name: 'Tarih',width: 70},
                    {name: 'Alan',width: 30},
                    {name: 'Fiyat',width: 30},
                    {name: 'Coords',width: 40}
                    
                ]
            });
        </script>
    </body>
    
</html>